package com.jiai.cloud.feign;
import com.jiai.cloud.entity.TOrder;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
import static org.springframework.web.bind.annotation.RequestMethod.POST;


@FeignClient("authentication")
public interface OrderAPI {

    //增
    @RequestMapping(value="/api/v1/order/addOrder")
    Object addOrder(@RequestBody TOrder tOrder);

    //删
    @RequestMapping(value="/api/v1/order/del/{orderNo}")
    Object delete(@PathVariable("orderNo") String orderNo);

    //查
    @RequestMapping("/api/v1/order/findByid/{orderNo}")
    Object selectById(@PathVariable("orderNo") String orderNo);

    @RequestMapping(value = "/api/v1/order/findByAll/{page}")
    Object selectPage(@PathVariable("page") Integer page);

    //改(有就改，没有就插入)
    @RequestMapping(value="/api/v1/order/edit")
    @ResponseBody
    Object edit(TOrder tOrder);

}